2d arraylist in java

117

creating a 2d arraylist in java -

List<List<String>> listOfLists = new ArrayList<List<String>>(size); 
for(int i=0; i<size; i++) {
	listOfLists.add(new ArrayList<String>());
}

Comments

Submit
0 Comments